package com.home766.controller.shop;

import com.home766.entity.ReleaseSystem;
import com.home766.service.ReleaseSystemService;
import net.biz.controller.shop.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Controller("releaseSystem")
@RequestMapping("/shop/releaseSystem")
public class ReleaseSystemController extends BaseController {
	
	@Resource(name="releaseSystemServiceImpl")
	private ReleaseSystemService releaseSystemService;

	@RequestMapping("/info")
	@ResponseBody
	public Map<String,Object> info(){
		ReleaseSystem releaseSystem = releaseSystemService.getSigle();
		Map<String,Object> map = new HashMap<String,Object>();
		if(releaseSystem!=null){
			map.put("content", releaseSystem.getContent());
			map.put("state", releaseSystem.getState());
		}
		return map;
	}
}
